import getpass
card = int(getpass.getpass("请输入数字："))
count = 0
while True:
    if count < 3:
        user_guess = int(input("请输入你猜的数字："))
        if card == user_guess:
            print("答对了！")
            break
        elif card > user_guess:
            print("往大的猜")
        else:
            print("往小的猜")
    else:
        print("你没得机会猜了")
        break
    count = count + 1